import 'package:dart_vlc/dart_vlc.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:palyer/app/components/custom_app_bar.dart';

import 'package:palyer/app/modules/player/player/controller.dart';

class PlayerPage extends StatelessWidget {
  const PlayerPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final controller = Get.put(PlayerController());
    return Scaffold(
      appBar: CustomAppBar(
        title: const Text('快播flutter版'),
        actions: [
          IconButton(
            onPressed: controller.selectFile,
            icon: const Icon(
              Icons.insert_drive_file_rounded,
            ),
          )
        ],
      ),
      body: Video(
        player: controller.player,
        // showControls: true,
        // playlistLength: 3,
        progressBarThumbColor: Theme.of(context).indicatorColor,
        progressBarActiveColor: Theme.of(context).indicatorColor,
      ),
    );
  }
}
